Taking a full reference of the attach widget creates a reference
cycle, and keeps the attach_widget alive longer than it should.
{
_gtk_widget_remove_attached_window (priv->attach_widget, window);
- g_object_unref (priv->attach_widget);
+ g_object_remove_weak_pointer (priv->attach_widget, &priv->attach_widget);
priv->attach_widget = NULL;
}
}
{
_gtk_widget_add_attached_window (priv->attach_widget, window);
- g_object_ref (priv->attach_widget);
+ g_object_add_weak_pointer (priv->attach_widget, &priv->attach_widget);
}
/* Update the style, as the widget path might change. */